<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;

class TiebaCrawlerStatus extends Model
{
    const STATUS_ON_QUEUE = 0;

    const STATUS_PREPARING = 1;

    const STATUS_FETCHING = 2;

    const STATUS_FETCHED = 3;

    const STATUS_DONE = 4;

    const STATUS_ERROR = 5;

    protected $table = 'tieba_crawler_status';

    public function user()
    {
        return $this->belongsTo(User::class);
    }

    public function repository()
    {
        return $this->belongsTo(Repository::class);
    }
}
